package com.itobase.statusDetect.Util;

import lombok.Data;

@Data
public class Message {

    public int code;

    public String msg;

    public Object data;

    public Message(int code,String msg,Object data){
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public static Message success(Object o){
        return new Message(0,"",o);
    }

    public static Message error(String msg){
        return new Message(-1,msg,null);
    }

    public static Message error(int code,String msg){
        return new Message(code,msg,null);
    }


}
